


/*------------------------------------------------------------------------------
	
	Table A.2: Descriptive statistics for teacher variables
	----------
	
------------------------------------------------------------------------------*/

 
global replica_dir="<add path to your working directory>"
global data_dir=	"$replica_dir/data"
global output_dir=	"$replica_dir/output"



		
*	Teacher level analysis
		

use "$data_dir/tlvl_fin.dta", clear
 
la var gender  		"Teacher men, baseline"
la var exp 			"Experience, baseline"
la var tit_educ 	"Education degree, baseline"
la var municip 		"Municipal school, baseline"
la var rural_rbd 	"Rural school, baseline"
la var permanent 	"Permanent contract, baseline"
la var nsch 		"Number of schools employeed, baseline"
la var multsch 		"Teach in multiple schools, baseline" 
la var tea_admin 	"Administrative duties mainly, baseline" 

la var horas_contrato 	"Contract hours, baseline"
la var tea_classhrs  	"Classroom teaching hours , baseline"
 
la var horas_contrato_tp1 	"Contract hours, outcome"
la var tea_classhrs_tp1  	"Classroom teaching hours , outcome"

la var treat25 "Selected for 100\% SNED award"
la var treat10 "Selected for 60\% SNED award"

replace treat25=0 if treat10==0
replace treat10=0 if treat25==1

 
global baseline_t "gender tit_educ permanent tea_admin municip rural_rbd multsch horas_contrato tea_classhrs "
global outcome_t "horas_contrato_tp1 tea_classhrs_tp1 "


estpost su treat25 treat10 ${baseline_t}  ${outcome_t}	  
est store C 
 

esttab C using "$output_dir/sumstats_t.tex", replace ///
		mtitle( "SNED 2006-07 to SNED 2014-15 & Mean & Standard deviation") ///
		cells("mean(fmt(3)) sd(fmt(3)par)") booktabs  num collabels(none) f label //gaps obs

		
		
		
*	School level analysis
		

use "$data_dir/slvl_fin.dta", clear

la var gender  "Teacher men, baseline"
la var exp 		"Experience, baseline"
la var tit_educ "Education degree, baseline"
la var municip "Municipal school, baseline"
la var rural_rbd "Rural school, baseline"
la var permanent "Permanent contract, baseline"
la var multsch  "Number of schools employeed, baseline"
la var tea_admin 	"Administrative duties mainly, baseline" 

la var dropped  "Turnover: Lagged attrition, baseline"
la var newtea    "Turnover: Prop. new teachers, baseline"
la var exp   	"Mean teacher experience, baseline"
la var aep10  	"Prop. AEP certified, baseline"

la var dropped_tp1  "Turnover: Lagged attrition, outcome"
la var newtea_tp1    "Turnover: Prop. new teachers, outcome"
la var exp_tp1   	"Mean teacher experience, outcome"
la var aep10_tp1  	"Prop. AEP certified, outcome"

la var treat25 "Selected for 100\% SNED award"
la var treat10 "Selected for 60\% SNED award"

replace treat25=0 if treat10==0
replace treat10=0 if treat25==1

global baseline_s "gender tit_educ permanent tea_admin municip rural_rbd  exp multsch dropped newtea  aep10 "	// jul 8th
global outcome_s "dropped_tp1 newtea_tp1 exp_tp1 aep10_tp1"	
 


estpost su treat25 treat10	${baseline_s}   ${outcome_s}  
est store C 

esttab C using "$output_dir/sumstats_s.tex", replace ///
		mtitle( "SNED 2006-07 to SNED 2014-15 & Mean & Standard deviation") ///
		cells("mean(fmt(3)) sd(fmt(3)par)" ) booktabs  nonum collabels(none) f label //gaps obs



















